﻿#include "dialog.h"
#include "ui_dialog.h"

#include <QPixmap>
#include <QSettings>

Dialog::Dialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::Dialog)
{
    ui->setupUi(this);
    setWindowFlags(Qt::FramelessWindowHint);
    this->setAutoFillBackground(true);
    this->setStyleSheet("background-color:white;");
    ui->label->setFrameStyle(QFrame::NoFrame);
    ui->label_1->setFrameStyle(QFrame::NoFrame);
    ui->label_2->setFrameStyle(QFrame::NoFrame);
    ui->label_4->setFrameStyle(QFrame::NoFrame);
    ui->label_5->setFrameStyle(QFrame::NoFrame);
    ui->label_1->setFont( QFont( "Arial", 11, 63) );
    ui->label_2->setFont( QFont( "Arial", 11, 63) );
    ui->label_4->setFont( QFont( "Arial", 15, 81) );
    ui->label_5->setFont( QFont( "Arial", 11, 63) );
}

Dialog::~Dialog()
{
    delete ui;
}

void Dialog::setPic()
{
    QString pixmap="print_logo.jpg";
    ui->label->setPixmap(QPixmap(pixmap));
    ui->label->setScaledContents(true);
}

void Dialog::slotshow(QString str1, QString str2, QString str3, QString str4)
{
    setPic();
    ui->label_1->setText(str1);
    ui->label_2->setText(str2);
    ui->label_4->setText(str4);
    ui->label_5->setText(str3);
}
